package com.cby.android.base.aidl

import com.cby.android.base.ILoginCallback
import com.cby.android.base.IUserAction

/**
 * @description: UserBinder
 *
 * @author ChenBaoyang
 * @date 2021/10/22 14:18
 */
class UserActionBinder : IUserAction.Stub() {

    override fun init(gameId: String?, orientation: Int, autoLogin: Boolean) {
        UserManager.instance.init(gameId, orientation, autoLogin)
    }

    override fun Login(callback: ILoginCallback?) {
        UserManager.instance.doLogin(callback)
    }

    override fun getUserId(): String? {
        return UserManager.instance.userId
    }

    override fun isTheSameUser(userId: String?): Boolean {
        return UserManager.instance.userId == userId
    }
}